package com.solarfridge.monitor.client;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.solarfridge.monitor.shared.data.Fridge;
import com.solarfridge.monitor.shared.data.FridgeData;

/**
 * Ascyn to DataService
 */
public interface DataServiceAsync {

	void getNumFridges(AsyncCallback<Integer> callBack);
	void getFridgeList(AsyncCallback<Fridge[]> callBack);
	void getFridgeById(String id, AsyncCallback<Fridge> callBack);
	void saveFridge(Fridge fridgeToSave, AsyncCallback<Integer> callBack);
	void updateFridge(Fridge updateFridge, AsyncCallback<Integer> callBack);
	void recordData(FridgeData dataToRecord, AsyncCallback<Integer> callBack);
	void getRecentData(String fridgeId, int numRecords, AsyncCallback<List<FridgeData>> callBack);
}
